#include "Sprite.h"


Sprite::Sprite(Model& model): m_Model(model)
{
	m_bHidden = false;
}


Sprite::~Sprite(void)
{
}

void Sprite::SetHidden(bool hidden)
{
	m_bHidden = hidden;
}

bool Sprite::GetHidden(void)
{
	return m_bHidden;
}

void Sprite::Draw(void)
{
	if(m_bHidden)
	{
		return;
	}

	glColor3f(0.f, 1.f, 1.f);

	glBegin(GL_TRIANGLE_FAN);
		glVertex2f(m_Model.x(), m_Model.y());
		glVertex2f(m_Model.x() + m_Model.width(), m_Model.y());
		glVertex2f(m_Model.x() + m_Model.width(), m_Model.y() + m_Model.height());
		glVertex2f(m_Model.x(), m_Model.y() + m_Model.height());
	glEnd();
}